summaryrefslogtreecommitdiff
path: root/src/number.h
blob: 4ada8298f1ff034703fdf96943280dfada9498f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef NUMBER_H
#define NUMBER_H

#include <bu/string.h>
#include "packedintarray.h"

class Number
{
public:
    Number( int iOrd=0 );
    Number( const Bu::String &sData, int iOrd=0 );
    virtual ~Number();

    Number operator+( const Number &rhs ) const;

    operator Bu::String() const
    {
        return aInt.toString();
    }

    Bu::String toString() const { return aInt.toString(); }

    int digit( int iOrder ) const;

private:
    int iOrd;
    PackedIntArray aInt;
};

#endif